<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>

<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>
		<s:text name="applcation.name"/>
	</title>
	
	<link rel="stylesheet" href="<%=request.getContextPath() %>/css/main.css">
	<link rel="stylesheet" href="<%=request.getContextPath() %>/jquery-bundle/themes/base/jquery.ui.all.css">
	<link rel="stylesheet" href="<%=request.getContextPath() %>/jquery-bundle/themes/base/jquery.ui.all.css">
	<link rel="stylesheet" href="<%=request.getContextPath() %>/jquery-bundle/demos/demos.css">
	<script src="<%=request.getContextPath() %>/jquery-bundle/jquery-1.5.1.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/external/jquery.bgiframe-2.1.2.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.core.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.mouse.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.draggable.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.position.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.resizable.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.dialog.js"></script>
    <script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.effects.core.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.effects.blind.js"></script>
	<script src="<%=request.getContextPath() %>/jquery-bundle/ui/jquery.effects.explode.js"></script>
	
	<script src="<%=request.getContextPath() %>/js/jquery.listnav-2.1.js"></script>
	
    <script type='text/javascript' src='<%=request.getContextPath() %>/jquery-bundle/ui/jquery.ui.autocomplete.js'></script>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jquery-bundle/themes/ui-lightness/jquery.ui.autocomplete.css" />
	
	<script language="javascript" type="text/javascript" src="<%=request.getContextPath() %>/js/datepicker/WdatePicker.js"></script>
	<script src="<%=request.getContextPath() %>/js/main.js"></script>
	
	<script type="text/javascript">
		 String.prototype.trim=function(){
		   return this.replace(/(^\s*)|(\s*$)/g, "");
		 };
		 String.prototype.ltrim=function(){
		    return this.replace(/(^\s*)/g,"");
		 };
		 String.prototype.rtrim=function(){
			return this.replace(/(\s*$)/g,"");
		 };
		 
		function needHandSa(){
			 location.href="SaMgr_needHandSa.do?saType="+$("#saType").val();
		}
		
		function handedSa(){
			 location.href="SaMgr_handedSa.do?saType="+$("#saType").val();
		}
	</script>
</head>


<body style="padding-top: 0;margin-top: 0">
	<table align="center" style="width:1024px;filter:alpha(opacity=85)">
	    <tr  style="padding-top: 0;margin-top: 0">
	    	<td >
	    		<table >
					<tr  style="position:relative;width:100%;height:30px;z-index:800;line-height:normal;background-color: #7093DB;">
						<c:if test="${sessionScope.user.isRoot == true}">
							<td ><a class="menu_enable" href="UserMgr_search.do"><s:text name="manu.sub.userSearch"/></a></td>
							<td ><a class="menu_enable"  href="GatwayMgr_index.do"><s:text name="manu.sub.gatwayManage"/></a></td>
							<td ><a class="menu_enable"  href="StationMgr_index.do">Station Manage</a></td>
						</c:if>
						<td >
							<c:if test="${sessionScope.user.isCustomer == true}">
								<a  class="menu_enable" href="SaMgr_search.do?saType=all"><s:text name="manu.sub.saSearch"/></a>
							</c:if>
							<c:if test="${sessionScope.user.isCustomer == false}">
								<a  class="menu_enable" href="SaMgr_search.do"><s:text name="manu.sub.saSearch"/></a>
							</c:if>
						</td>
						<c:if test="${sessionScope.user.isRoot == true}">
							<td ><a  class="menu_enable" href="UserMgr_editAccount.do"><s:text name="manu.sub.editAccount"/></a></td>
						</c:if>
					</tr>
				</table>	
	    	</td>
	    	<td  align="right" style="font-weight: 500; font-size: 1em;font-style: italic;">
	    		<c:if test="${showQuickLink == true}">
		    		<c:if test="${sessionScope.user.isCustomer == false}">
							<a href="javascript:void(0)" onclick="needHandSa();">UNREAD (${sessionScope.user.needHandSa})</a>
					</c:if>
					<c:if test="${sessionScope.user.isCustomer == true}">
							<a href="javascript:void(0)" onclick="handedSa();">UNREAD (${sessionScope.user.handedSa})</a>
					</c:if>
	    		</c:if>
	    	   <s:text name="label.welcome"/>： ${sessionScope.user.username}
	    	   <a href="<s:url action="User_logout" />"><s:text name="action.logout"/></a>
	    	</td>
	    </tr>
	    <c:if test="${sessionScope.user.isCustomer == true}">
		    <tr>
		    	<td width="250" height="50"> 
		    		 <c:if test="${sessionScope.user.icon != null}">
			    		<img width="270" height="50"  src="<%=request.getContextPath() %>/img/userIcon/${sessionScope.user.icon}"/>
		    		 </c:if>
		    		 <c:if test="${sessionScope.user.icon == null}">
		    		 	<img width="270" height="50"  src="<%=request.getContextPath() %>/img/trans.gif"/>
		    		 </c:if>
		    	</td>
		    </tr>
	    </c:if>
		<tr >
			<td colspan="2" width="100%" height="100%" style="vertical-align: top;" align="center">
				<table align="center" width="100%" style="padding-top: 0.5cm;">
					<tr align="center">
						<td>
					    	<tiles:insertAttribute name="content"/>
						</td>
				    </tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>